---
editor_options:
  markdown:
    wrap: 72
output: pdf_document
---

# Replication materials for: "Does Protest Influence Political Speech? Evidence from UK Climate Protest, 2017-2019"

-   01_embed_terms.R: train embedding layer from tweets.
-   02_gen_clim_terms.R: use embedding for label propagation of
    climate-related terms.
-   03_merge_all_cross_section.R: generate cross-sectional cross-walk
    file.
-   04_create_first_panel.R: generate panel dataset of MP-tweet-days
-   05_merge_poselecs_cross_section.R: add in MP positions data.
-   06_plot_distributions.R: generate Figure 1.
-   11_baseline_models.R: estimate baseline models.
-   12_petition_analysis.R: estimate petitions models.
-   13_heterogeneous_effects.R: estimate heterogeneous effects models.
-   14_mp_bjps_robustness.R: estimate additional robustness models.
-   15_models_binary.R: estimate binary models.
-   16_baseline_models_expanded.R: estimate models with expanded
    dictionary outcome.
-   21_get_cs_corpus.R: build corpus of climate-related speech.
-   22_word_embed_tweets.R: get contrasting terms from tweets for Figure
    A3.
-   23_word_embed_speeches.R: et contrasting terms from speeches for
    Figure A3.
-   24_alc_ts_tweets.R: plot Figure A3.
-   25_alc_ts_speeches.R: estimate ALC embedding time-series analysis
    for Figure 2.
-   26_plot_alc_ts.R: plot Figure 2.
-   31_climtwt_check.R: check content of climate-related tweets.
-   32_fff_orgs_descriptive.R: get descriptive stats for FFF
    organizations.

## Directory structure

```
├── data
│   ├── analysis
│   │   ├── MP_cs_all.csv
│   │   ├── MP_panelv2.RDS
│   │   ├── MP_panelv2.csv
│   │   ├── MP_panelv2.dta
│   │   ├── MP_panelv2_climpolicyterms.csv
│   │   ├── MPspeeches.RData
│   │   ├── MPspeeches_corpus.rds
│   │   ├── MPtweets_corpus.rds
│   │   ├── MPtweetsv2.Rdata
│   │   ├── cos_sims_speeches.rds
│   │   ├── cos_sims_tweets.rds
│   │   ├── mp_df.rds
│   │   ├── mp_hte_covariates.csv
│   │   ├── petition_20191007_deforestation.csv
│   │   └── petition_20191028_restoringnature.csv
│   ├── images
│   │   ├── Screenshot 2023-02-10 at 12.25.03.png
│   │   ├── Screenshot 2023-02-10 at 12.25.26.png
│   │   ├── Screenshot 2023-02-10 at 12.25.42.png
│   │   ├── Screenshot 2023-02-10 at 13.16.04.png
│   │   ├── Screenshot 2023-02-10 at 13.16.52.png
│   │   ├── Screenshot 2023-02-10 at 13.17.13.png
│   │   ├── Screenshot 2023-02-10 at 13.17.20.png
│   │   └── Screenshot 2023-02-10 at 13.17.26.png
│   ├── output
│   │   ├── FFF_events_dates.csv
│   │   ├── MP_posdays.csv
│   │   ├── MPclimprot_twts.csv
│   │   ├── MPclimprot_twts_coded.csv
│   │   ├── clim_bigrams.csv
│   │   ├── clim_bigrams_coded2.csv
│   │   ├── climgenterms.csv
│   │   ├── climgenterms.rds
│   │   ├── climpolicyterms.csv
│   │   ├── climpolicyterms.rds
│   │   ├── climspchs_coded.csv
│   │   ├── climspchs_tocode.csv
│   │   ├── climtwts_coded.csv
│   │   ├── climtwts_tocode.csv
│   │   ├── cons_codes.RData
│   │   ├── contrast_cspeech.RData
│   │   ├── contrast_ctweet.RData
│   │   ├── elec_results17_bes.RDS
│   │   ├── fff_events.csv
│   │   ├── fff_events_formatted.csv
│   │   ├── fff_urls_formatted.csv
│   │   ├── fff_urls_formatted_coded.csv
│   │   ├── gss_FFF_events.csv
│   │   ├── orgcounts.rds
│   │   └── speeches.csv
│   ├── raw
│   │   └── MP_positions.csv
│   └── wordembeddings
│       ├── glove.rds
│       ├── khodakA.rds
│       └── local_glove.rds
├── mp_enviro_bjps.Rproj
├── plots
│   ├── fig1.png
│   ├── fig2.png
│   ├── fig3.png
│   ├── figa1.png
│   ├── figa2.png
│   ├── figa3.png
│   ├── figa4.png
│   ├── figa5.png
│   └── figa6.png
└── utils.R
```
